export const getCurrentMonthList = (date: string | Date) => {
  const monthConfig = []
  let monthNum = new Date(date).getMonth()
  let yearNum = new Date(date).getFullYear()
  for (let i = 0; i < 12; i++) {
    if (monthNum < 0) {
      monthNum = 11
      yearNum = yearNum - 1
    }
    monthConfig.unshift(`${yearNum}-${monthNum + 1}`)
    monthNum -= 1
  }
  return monthConfig
}
export const getLastYearDate = (date: string) => {
  const [year, month] = date.split('-')
  return `${parseInt(year) - 1}-${month}`
}
export const getNextYearDate = (date: string) => {
  const [year, month] = date.split('-')
  return `${parseInt(year) + 1}-${month}`
}
